  
from  graphrag.config.load_config import load_config
from graphrag.api import global_search,basic_search
from pathlib import Path
PROJECT_DIRECTORY="./"
 
import pandas as pd
from graphrag.api import build_index,basic_search
 
from graphrag.index.typing.pipeline_run_result import PipelineRunResult

if __name__ == "__main__":
    import asyncio
    graphrag_config = load_config(Path(PROJECT_DIRECTORY))

    text_units = pd.read_parquet(f"{PROJECT_DIRECTORY}/output/text_units.parquet")

    print("start")
    response, context = asyncio.run(basic_search(
    config=graphrag_config,
    text_units=text_units,
    query="Where did she go in the end?",
    ))
    print("end")
    print(response)
    


